<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>用户列表</title>
    <link href="/botutp/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/botutp/Public/admin/js/jquery.js"></script>

    <script type="text/javascript" src="/botutp/Public/layer/layer.js"></script>

    <link href="/botutp/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/botutp/Public/admin/js/jquery.idTabs.min.js"></script>
    <script type="text/javascript" src="/botutp/Public/admin/js/select-ui.min.js"></script>
     <script type="text/javascript" src="/botutp/Public/My97DatePicker/WdatePicker.js"></script>
    <script>
        //弹出文件导入界面
        function leadingin(){
            layer.open({
                type: 2,
                title: '导入用户信息',
                maxmin: false,
                shadeClose: true, //点击遮罩关闭层
                area : ['800px' , '520px'],
                content: ['<?php echo U("user/leadingin");?>'],
                end: function () {
                        location.reload();
                    }
            });
        }
    </script>
    </head>

    <body>

        <div class="place">
            <span>位置：</span>
            <ul class="placeul">
                <li><a href="<?php echo U('index/welcome');?>">首页</a></li>
                <li><a href="<?php echo U('user/index');?>">用户列表</a></li>
            </ul>
        </div>

        <div class="formbody"> 
            <ul class="toolbar">
            <li onclick="location.href = '<?php echo U('user/adduser');?>'"><span><img src="/botutp/Public/admin/images/t01.png" /></span>添加用户</li> 

             <li onclick="leadingin();"><span><img src="/botutp/Public/admin/images/t01.png" /></span>批量导入用户</li> 
            </ul> 

            <form name="seachform" id="seachform" action="<?php echo U('user/index');?>" method="post">
                <ul class="seachform">
                    <li><label>用户名</label><input name="username"  value="<?=I('username')?>" type="text" class="scinput" /></li>	

                    <li><label></label><input placeholder="截止时间" name="usertime" id="endtime" class="scinput" type="text" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd'})" datatype="*" errormsg="时间范围结束值范围不能为空！" maxlength="20" style="width: 170px;" readonly value="<?=I('usertime')?>" /></li>

                    <li><label>&nbsp;</label><input name="" type="submit" class="scbtn" value="查询"/></li>
                </ul>
            </form>

            <table class="tablelist">
                <thead>
                    <tr> 
                        <th>用户名</th>
                        <th>截止时间</th>
						<th>每天下载次数</th>
						<th>当天可下载次数</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <?php if(is_array($dataList)): $i = 0; $__LIST__ = $dataList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr>						
							<td><?= $value['username']?></td>
                            <td><?= date('Y-m-d H:i:s',$value['usertime'])?></td> 
							<td><?= $value['kxz']?></td> 
							<td><?= $value['yxz']?></td> 
                            <td>
								<a href="<?php echo U('user/userrate',array('id'=>$value['id']));?>" class="tablelink">设置次数</a>
                                <a href="<?php echo U('user/editpwd',array('id'=>$value['id']));?>" class="tablelink">修改密码</a>
                                <a href="<?php echo U('user/editusertime',array('id'=>$value['id']));?>" class="tablelink">修改时间</a>
                                <a href="<?php echo U('user/deluser',array('id'=>$value['id']));?>" onclick="{if(confirm('确认删除?')){return true;}return false;}" class="tablelink">删除</a>
                            </td>
                        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                </tbody>
            </table>

            <?php echo ($pageshow); ?>

        </div>
        <script type="text/javascript">
            $('.tablelist tbody tr:odd').addClass('odd');
        </script>
    </body>

</html>